/*
在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
方法的重载
 */

import java.util.Scanner;

public class Work6 {

    public static int sum(int a,int b){
        return a+b;
    }

    public static double sum(double a,double b,double c){
        return a+b+c;
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        double x = sc.nextDouble();
        double y = sc.nextDouble();
        double z = sc.nextDouble();
        System.out.println(sum(a,b));
        System.out.println(sum(x,y,z));
    }
}
